<html>
<head><meta charset="utf-8"><title>ICE-#58837 · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/ICE-.2358837.html">ICE-#58837</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="159852219"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/ICE-%2358837/near/159852219" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/ICE-.2358837.html#159852219">(Mar 03 2019 at 15:21)</a>:</h4>
<p><span class="user-mention" data-user-id="123856">@Vadim Petrochenkov</span> any idea as to why the ICE happens in the repro I made? not sure why <code>NonMacroAttr(Builtin)</code> even occurs...</p>



<a name="159852439"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/ICE-%2358837/near/159852439" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/ICE-.2358837.html#159852439">(Mar 03 2019 at 15:26)</a>:</h4>
<p>the ICE also seems quite specific to <code>rustc_mir</code>; changing to other crates doesn't seem to repro</p>



<a name="159852702"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/ICE-%2358837/near/159852702" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Vadim Petrochenkov <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/ICE-.2358837.html#159852702">(Mar 03 2019 at 15:33)</a>:</h4>
<p><code>#[rustc_mir]</code> is actually a built-in attribute.</p>



<a name="159852705"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/ICE-%2358837/near/159852705" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Vadim Petrochenkov <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/ICE-.2358837.html#159852705">(Mar 03 2019 at 15:33)</a>:</h4>
<p>I haven't yet looked why it gets into a <code>Module</code> though.</p>



<a name="159852829"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/ICE-%2358837/near/159852829" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/ICE-.2358837.html#159852829">(Mar 03 2019 at 15:37)</a>:</h4>
<p><span class="user-mention" data-user-id="123856">@Vadim Petrochenkov</span> ah; iirc the origin is <a href="https://github.com/rust-lang/rust/blob/master/src/librustc_interface/util.rs#L15" target="_blank" title="https://github.com/rust-lang/rust/blob/master/src/librustc_interface/util.rs#L15">https://github.com/rust-lang/rust/blob/master/src/librustc_interface/util.rs#L15</a> which is then used in <a href="https://github.com/rust-lang/rust/blob/master/src/librustc_interface/util.rs#L52" target="_blank" title="https://github.com/rust-lang/rust/blob/master/src/librustc_interface/util.rs#L52">https://github.com/rust-lang/rust/blob/master/src/librustc_interface/util.rs#L52</a> -- maybe there's a conflict between the attribute and the crate?</p>



<a name="159853041"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/ICE-%2358837/near/159853041" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/ICE-.2358837.html#159853041">(Mar 03 2019 at 15:42)</a>:</h4>
<p>So changing things to e.g. <code>use warn;</code> or <code>use ignore;</code> will also repro; more generally any attribute in <a href="https://github.com/rust-lang/rust/blob/master/src/libsyntax/feature_gate.rs#L828" target="_blank" title="https://github.com/rust-lang/rust/blob/master/src/libsyntax/feature_gate.rs#L828">https://github.com/rust-lang/rust/blob/master/src/libsyntax/feature_gate.rs#L828</a> seems to do it (aside from <code>cfg</code>).</p>



<a name="159853486"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/ICE-%2358837/near/159853486" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Vadim Petrochenkov <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/ICE-.2358837.html#159853486">(Mar 03 2019 at 15:56)</a>:</h4>
<p>If everything works correctly, then <code>rustc_mir</code> in <code>rustc_mir::DIAGNOSTICS</code> should only be resolved in type namespace and the resolution in macro namespace should never end up in <code>Module</code>.</p>



<a name="159853491"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/ICE-%2358837/near/159853491" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Vadim Petrochenkov <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/ICE-.2358837.html#159853491">(Mar 03 2019 at 15:56)</a>:</h4>
<p>Even if the name exists in multiple namespaces.</p>



<a name="159854446"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/ICE-%2358837/near/159854446" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/ICE-.2358837.html#159854446">(Mar 03 2019 at 16:24)</a>:</h4>
<p>makes sense</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>